package org.pay.core.service;

import org.pay.core.entity.RefundOrder;

import java.util.List;
import java.util.Map;

/**
 * @author: yangshancheng
 * @date: 17/10/26
 * @description: 退款业务
 */
public interface IRefundOrderService {

    Map create(String jsonParam);

    Map select(String jsonParam);

    Map selectByMchIdAndRefundOrderId(String jsonParam);

    Map selectByMchIdAndMchRefundNo(String jsonParam);

    Map updateStatus4Ing(String jsonParam);

    Map updateStatus4Success(String jsonParam);

    Map updateStatus4Complete(String jsonParam);

    RefundOrder findByRefundOrderId(String refundOrderId);

    RefundOrder find(RefundOrder refundOrder);

    List<RefundOrder> select(int offset, int limit, RefundOrder refundOrder);

    Integer count(RefundOrder refundOrder);

    RefundOrder baseSelectRefundOrder(String refundOrderId);

    RefundOrder baseSelectByMchIdAndRefundOrderId(Long mchId, String refundOrderId);

    RefundOrder baseSelectByMchIdAndMchRefundNo(Long mchId, String mchRefundNo);

    int baseCreateRefundOrder(RefundOrder refundOrder);

    int baseUpdateStatus4Ing(String refundOrderId, String channelOrderNo);

    int baseUpdateStatus4Success(String refundOrderId);

    int baseUpdateStatus4Success(String refundOrderId, String channelOrderNo);

    int baseUpdateStatus4Complete(String refundOrderId);

    int baseUpdateStatus4Fail(String refundOrderId, String channelErrCode, String channelErrMsg);

}
